/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package co.com.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author 839398
 */
@Embeddable
public class TblInsumoActividadPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "actividad")
    private int actividad;
    @Basic(optional = false)
    @Column(name = "insumo")
    private int insumo;

    public TblInsumoActividadPK() {
    }

    public TblInsumoActividadPK(int actividad, int insumo) {
        this.actividad = actividad;
        this.insumo = insumo;
    }

    public int getActividad() {
        return actividad;
    }

    public void setActividad(int actividad) {
        this.actividad = actividad;
    }

    public int getInsumo() {
        return insumo;
    }

    public void setInsumo(int insumo) {
        this.insumo = insumo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) actividad;
        hash += (int) insumo;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TblInsumoActividadPK)) {
            return false;
        }
        TblInsumoActividadPK other = (TblInsumoActividadPK) object;
        if (this.actividad != other.actividad) {
            return false;
        }
        if (this.insumo != other.insumo) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Actividad=" + actividad + "- Insumo=" + insumo;
    }
    
}
